#include<iostream>

using namespace std;

class Date
{
public:
	Date(int year = 0, int month = 0, int day = 0)
	{
		_year = year;
		_month = month;
		_day = day;
	}

	void Print()
	{
		cout << _year << "-" << _month << "-" << _day << endl;
	}

	Date(const Date& d)
	{
		_year = d._year;
		_month = d._month;
		_day = d._day;
	}

private:
	int _year;
	int _month;
	int _day;
};


template <typename T>
void Swap(T& x, T& y)
{
	T tmp = x;
	x = y;
	y = tmp;
}

int main()
{
	Date d1(1925, 5, 31);
	Date d2(2025, 5, 31);
	d1.Print();
	d2.Print();
	cout << "---------" << endl;
	Swap(d1, d2);
	d1.Print();
	d2.Print();
	return 0;
}
